/**
 * 
 */
package com.yangtao.prototype.util.select.web;

import java.util.List;

import com.yangtao.framework.constant.Option;
import com.yangtao.framework.util.Struts2Utils;
import com.yangtao.framework.web.BaseAction;
import com.yangtao.prototype.util.select.service.SelectService;

/**
 * @author 杨涛
 * 
 */
public class SelectAction extends BaseAction<SelectModel, SelectService> {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private SelectModel model = new SelectModel();
	private List<Option> slaveList;

	public String linkSelect() throws Exception {
		List<Option> slaveOptions = service.getSlaveList(model.getCode(), model
				.getType());
		Struts2Utils.renderJson(slaveOptions);
		// this.slaveList = slaveOptions;
		return null;
	}

	public List<Option> getSlaveList() {
		return slaveList;
	}
}
